<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateAdminInviteBindLog extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('admin_invite_bind_log', function (Blueprint $table) {
            $table->smallIncrements('id');
            $table->unsignedInteger('admin_id')->default(0)->comment('操作员ID');
            $table->string('invited_profile_id', 300)->default('')->comment('被绑定用户ID');
            $table->unsignedInteger('inviter_profile_id')->default(0)->comment('绑定用户ID');
            $table->timestamps();
            $table->unsignedTinyInteger('flag')->default(1);
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('admin_invite_bind_log');
    }
}
